home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 3874 < prev    next >
Encoding:
Text File  |  1996-08-05  |  1.1 KB  |  49 lines

  1. Path: news.tu-chemnitz.de!news
  2. From: hfst@hrz.tu-chemnitz.de (Hans Steffani)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: EOF error
  5. Date: 31 Jan 96 17:56:36 GMT
  6. Organization: University of Technology Chemnitz, FRG
  7. Message-ID: <4eoaom$edg@pyrrhus-f.hrz.tu-chemnitz.de>
  8. References: <4eo12b$om3@newsbf02.news.aol.com>
  9. NNTP-Posting-Host: tantalus-f.hrz.tu-chemnitz.de
  10.  
  11. polver@aol.com (Polver) writes:
  12.  
  13. >#include <stdio.h>
  14.  
  15. EOF should be there.
  16.  
  17. >main()
  18. >{
  19. >    int c;
  20.  
  21. >    c = getchar();
  22. >    while (c != EOF) {
  23. >        putchar(c);
  24. >        c = getchar(c);
  25. getchar() does not need any arguments.
  26. >    }
  27. >}
  28.  
  29. >I keep getting an error about EOF undefined ar not scalar or something.
  30.  
  31. I tried and it worked. You did include <stdio.h>. It should be found
  32. there (at least in my system it is). Have a look at stdlib.h maybe it
  33. is there.
  34.  
  35. >You can reply here or at pmarti01@hills.ccsf.cc.ca.us
  36.  
  37. If you like use 
  38. Followup-To:poster
  39. and
  40. Reply-To: pmarti01@hills.ccsf.cc.ca.us
  41.  
  42. h.f.s.
  43. >Thanks.
  44. --
  45. Hans Friedrich Steffani
  46. Institut fuer Elektrische Maschinen und Antriebe
  47. TU Chemnitz-Zwickau
  48. e-mail: hans.steffani@e-technik.tu-chemnitz.de
  49.